//package com.itheima.tlias84.config;
//
//import com.itheima.tlias84.interceptor.LoginInterceptor;
//import jakarta.annotation.Resource;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
///**
// * springmvc配置类，一般用来配置拦截器、跨域url等
// */
//@Configuration
////public class WebMvcConfig extends WebMvcConfigurationSupport {
////  如果继承WebMvcConfigurationSupport，springboot会自己处理时间
////  要使用自己定义的时间格式，需要实现WebMvcConfigurer接口
//public class WebMvcConfig implements WebMvcConfigurer {
//
//    @Resource
//    LoginInterceptor loginInterceptor;
//
//    @Override
//    /*protected*/ public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(loginInterceptor)
//                .addPathPatterns("/**") //添加拦截路径
//                .excludePathPatterns("/login"); //排除登录路径
//    }
//}
